/*
 * @Author: WangShuai 1830773767@qq.com
 * @Date: 2025-06-19 23:11:50
 * @LastEditors: WangShuai 1830773767@qq.com
 * @LastEditTime: 2025-06-23 14:23:41
 * @FilePath: \shangyitong\src\main.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//vue3提供的方法是createApp方法可以用来创建应用实例方法
import { createApp } from 'vue'
import router from '@/router'
import '@/assets/style/global.scss'
//引入ElementPlus插件
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/assets/iconfont/iconfont.css'
//通过自定义插件的方式安装全局组件
import GlobleComponent from '@/components'
//引入路由鉴权文件
import'./permission.ts'
//引入logon组件
import Login from'@/components/login/index.vue'
//引入中文
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
//引入pinia
import pinia from '@/store/index'
pinia.use(piniaPluginPersistedstate)
//引入根组件app
import App from '@/App.vue'
//利用createApp方法创建组件实例将应用实例挂在到挂在点上
//引入顶部全局组件
import HospitalTop from '@/components/HospitalTop/index.vue'
//注册底部全局组件
import HospitalBottom from '@/components/HospitalBottom/index.vue'
//注册就诊人全局组件
import Visitor  from '@/components/visitor/index.vue'
const app = createApp(App)
app.use(router)
app.use(ElementPlus, {
    locale: zhCn,
})
//安装pinia仓库
app.use(pinia)
app.component("HospitalTop", HospitalTop)
app.component("HospitalBottom", HospitalBottom)
app.component('Login',Login)
app.component('Visitor',Visitor)
//调用app.use方法安装全局组件
app.use(GlobleComponent)
//挂载
app.mount('#app')
